-------------------------------------------------------------------------------
      name:  Hearn_2023
       log:  elec-log.log
  log type:  text
 opened on:  30 Mar 2023, 18:20:57

. 
. 
. *  ***************************************************************** *
. *  ***************************************************************** *
. *     File-Name:   replication.do                                    *
. *     Author:      Eddie Hearn                                       *
. *     Purpose:     Hearn 2023 (MJLAS)                                *
. *     Input File:  elec-raw.csv                                      *
. *     Program:     Stata 17                                          *
. *     OS:          Debian GNU/Linux                                  *
. *  ****************************************************************  *
. *  ****************************************************************  *
. 
. ** The 2020 Presidential Election and Ally Perceptions of the US: A Natural Experiment in Japan
. 
.     set more off 

.     set scheme s1color

. **************************
. *load additional packages
. **************************
. 
.     capture ssc install outreg2 

. 
. **************************
. *make directories
. **************************
. 
.     capture mkdir stata-replication  

.     capture mkdir stata-replication/tables 

.     capture mkdir stata-replication/figures 

.     capture mkdir stata-replication/data

. 
. ****************************
. *load data -set delimiter
. ****************************
. 
.    import delimited data/election-raw.csv, varname(1)   clear
(encoding automatically selected: ISO-8859-1)
(12 vars, 1,260 obs)

.    #delimit ;
delimiter now ;
.    ***********************************;
. *controls: demographic variables   ;
. ***********************************;
.     gen age = q1-1 /*set min to 1*/ ;

.     gen region = q2 ;

.     gen female = q3 -1;

.     gen educ = q8;
(1 missing value generated)

.     gen collgrad = 1 if educ>8;
(651 missing values generated)

.         replace collgrad = 0 if educ <=8;
(651 real changes made)

.         replace collgrad =. if educ==.;
(1 real change made, 1 to missing)

.     gen inc = q9;
(3 missing values generated)

.     gen ldp_s = 3 if q7==1;
(755 missing values generated)

.         replace ldp_s =2 if q7==3;
(426 real changes made)

.         replace ldp_s =1 if q7==2;
(329 real changes made)

.     drop q1-q3 q7-q9;

. *********************************;
. *compare to national averages    ;
. *********************************;
.     tab region;

     region |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         50        3.97        3.97
          2 |         88        6.98       10.95
          3 |        431       34.21       45.16
          4 |        212       16.83       61.98
          5 |        227       18.02       80.00
          6 |         76        6.03       86.03
          7 |         38        3.02       89.05
          8 |        138       10.95      100.00
------------+-----------------------------------
      Total |      1,260      100.00

.     tab age;

        age |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |        178       14.13       14.13
          2 |        190       15.08       29.21
          3 |        214       16.98       46.19
          4 |        178       14.13       60.32
          5 |        500       39.68      100.00
------------+-----------------------------------
      Total |      1,260      100.00

.     tab female;

     female |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        605       48.02       48.02
          1 |        655       51.98      100.00
------------+-----------------------------------
      Total |      1,260      100.00

.     tab collgrad;

   collgrad |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        651       51.71       51.71
          1 |        608       48.29      100.00
------------+-----------------------------------
      Total |      1,259      100.00

.     tab inc;

        inc |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |        315       25.06       25.06
          2 |        193       15.35       40.41
          3 |        150       11.93       52.35
          4 |        122        9.71       62.05
          5 |         68        5.41       67.46
          6 |         95        7.56       75.02
          7 |         66        5.25       80.27
          8 |         66        5.25       85.52
          9 |         82        6.52       92.04
         10 |        100        7.96      100.00
------------+-----------------------------------
      Total |      1,257      100.00

. ****************************;
. *iv: treatment variable     ;
. ****************************;
.     gen elec_tr = 1 
>         if respid >1000 /*after nov 12*/;
(628 missing values generated)

.     replace elec_tr = 0 
>         if respid <1000 /*before oct 22*/;
(628 real changes made)

.     drop respid ;

. ***************************;
. *interaction variable      ;
. ***************************;
.     gen ldp_x_elec = ldp_s*elec_tr;

. ****************************;
. *dv: attitude toward us     ;
. ****************************;
.         local dv us_depend us_trust us_infl ;

.     local i = 4 ;

.     foreach x in `dv' { ;
  2.         gen `x' = (q`i'*-1) + 6 /*invert and set min to 1*/;
  3.         drop q`i' ;
  4.         local i = `i' + 1;
  5.     };

.     gen index = (us_depend + us_trust + us_infl)-2;

.      /*additive index - set min to 1*/;
. ****************************;
. *make figures in python     ;
. ****************************;
. /*python3 must be available to create graphs. If python3 is not available the
>  rest of the do-file will compile*/;
.     outsheet * using stata-replication/data/graphs.csv , comma replace ;

.     capture shell python3 graphs.py ;

.     capture rm graphs.txt ;

.     if _rc!=0 {;
.         display "Python failed...generating generic Stata graphs instead" ;
.         foreach x in `dv' { ;
  2.             graph bar, over(`x') by(elec_tr) ;
  3.             graph export stata-replication/figures/`x'2.svg, replace;
  4.             local ldp = 1 ;
  5.             while `ldp' <4  {;
  6.                 graph bar if  ldp_s ==`ldp', over(`x') by(elec_tr) ;
  7.                 graph export stata-replication/figures/`x'_`ldp'.svg, replace;
  8.                 local ldp = `ldp' +1 ;
  9.              } ;
 10.         } ;
.     } ;

.     else {;
.         display "Graphs generated by python" ;
Graphs generated by python
.         } ;

. *************************;
. *Add labels              ;
. *************************;
.     label variable region "Geographic region"   ;

.     label variable age "Age cohort"   ;

.     label variable female "Gender"   ;

.     label variable educ "Education"   ;

.     label variable collgrad "College Graduate" ;

.     label variable inc "Family income"   ;

.     label variable ldp_s "Support for LDP"   ;

.         label define area 1 "Hokaido" 2 "Tohoku" 3 "Kanto" 4 "Chubu" 5 "Kinki
> " 6 "Chugoku" 7 "Shikoku" 8 "Kyushu";

.      label values region area;

.     tabulate region, generate(region);

 Geographic |
     region |      Freq.     Percent        Cum.
------------+-----------------------------------
    Hokaido |         50        3.97        3.97
     Tohoku |         88        6.98       10.95
      Kanto |        431       34.21       45.16
      Chubu |        212       16.83       61.98
      Kinki |        227       18.02       80.00
    Chugoku |         76        6.03       86.03
    Shikoku |         38        3.02       89.05
     Kyushu |        138       10.95      100.00
------------+-----------------------------------
      Total |      1,260      100.00

.         label define cohort 1 "18-29" 2"30-39" 3 "40-49" 4 "50-59" 5 "60-99" ;

.     label values age cohort   ;

.     label define gender 0 "male" 1 "female"   ;

.     label values female gender   ;

.         label define edyrs 1 "Junior high" 2 "Some high school" 3 "High schoo
>l grad" 4 "Some trade school" 5 "Trade school grad" 6 "Some juior college" 
>         7 "Junior college grad"  8 "Some university" 9 "University grad" 10 "
> Some graduate school" 11 "Graduate degree"   ;

.      label values educ edyrs   ;

.     label define finc 1 "Less than 3 million" 2 "3-4 million" 3 "4-5 million"
>  4 "5-6 million" 5 "6-7 million" 6 "7-8 million" 7 "8-9 million"  8 "9-10 mil
> lion" 9 "10-12 million" 10 "more than 12 million"   ;

.     label values inc finc   ;

.     label define exp_group 0 "Control group" 1 "Treatment group";

.      label values elec_tr exp_group;

.     label variable elec_tr "Treatment"   ;

.     label variable ldp_x_elec   "Interaction Term" ;

.     label define likert 1 "strongly disagree" 2 "disagree" 3 "neither" 4 "agr
> ee" 5 "strongly agree";

.     label values us_* likert;

.         label variable us_depend "Japan can rely on the US as a dependable al
> ly";

.     label variable us_trust "I am confident that US leaders will make good de
> cisions";

.     label variable us_inf "It is good if American ideas and customs spread to
>  Japan";

.     *************************;
. *election models         ;
. *************************;
.     local label "label" ;

.     local type "tex replace" ;

.     local m=1 ;

.     local title "title(Effect of 2020 Election)" ;

.     foreach x in `dv' { ;
  2.         oprobit `x' elec_tr ;
  3.             outreg2 using stata-replication/tables/main,
>                 `type'
>                 `label'
>                 `title'
>                 ctitle(Model `m', `x') ;
  4.             local type "tex append" ;
  5.             local title "" ;
  6.             local m = `m'+1 ;
  7.         oprobit `x' elec_tr ldp_s ldp_x_elec ;
  8.             outreg2 using stata-replication/tables/main, 
>                 `type'
>                 ctitle(Model `m', `x');
  9.             local m = `m'+1 ;
 10.         oprobit `x' elec_tr ldp_s ldp_x_elec age female collgrad inc regio
> n2 region3 region4 region5 region6 region7 region8;
 11.             outreg2 using stata-replication/tables/main, 
>                 `type'
>                 ctitle(Model `m', `x');
 12.             local m = `m'+1 ;
 13.     };

Iteration 0:   log likelihood = -1461.6933  
Iteration 1:   log likelihood = -1461.4094  
Iteration 2:   log likelihood = -1461.4094  

Ordered probit regression                               Number of obs =  1,260
                                                        LR chi2(1)    =   0.57
                                                        Prob > chi2   = 0.4511
Log likelihood = -1461.4094                             Pseudo R2     = 0.0002

------------------------------------------------------------------------------
   us_depend | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     elec_tr |  -.0458986   .0609132    -0.75   0.451    -.1652863    .0734891
-------------+----------------------------------------------------------------
       /cut1 |  -2.190992   .0952874                     -2.377752   -2.004232
       /cut2 |  -1.411387   .0595488                     -1.528101   -1.294674
       /cut3 |   .0007325   .0468035                     -.0910008    .0924657
       /cut4 |   1.448613   .0611213                      1.328817    1.568408
------------------------------------------------------------------------------
stata-replication/tables/main.tex
dir : seeout

Iteration 0:   log likelihood = -1461.6933  
Iteration 1:   log likelihood = -1369.5216  
Iteration 2:   log likelihood = -1369.1971  
Iteration 3:   log likelihood =  -1369.197  

Ordered probit regression                               Number of obs =  1,260
                                                        LR chi2(3)    = 184.99
                                                        Prob > chi2   = 0.0000
Log likelihood = -1369.197                              Pseudo R2     = 0.0633

------------------------------------------------------------------------------
   us_depend | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     elec_tr |   .4208105   .1752302     2.40   0.016     .0773656    .7642554
       ldp_s |    .637752   .0567098    11.25   0.000     .5266029     .748901
  ldp_x_elec |  -.2104559   .0769874    -2.73   0.006    -.3613484   -.0595634
-------------+----------------------------------------------------------------
       /cut1 |  -1.015539   .1482205                     -1.306046   -.7250325
       /cut2 |  -.1592106   .1288064                     -.4116665    .0932453
       /cut3 |   1.376309   .1311059                      1.119346    1.633272
       /cut4 |   2.958993   .1472282                      2.670431    3.247555
------------------------------------------------------------------------------
stata-replication/tables/main.tex
dir : seeout

Iteration 0:   log likelihood = -1458.2694  
Iteration 1:   log likelihood = -1341.1559  
Iteration 2:   log likelihood = -1340.5249  
Iteration 3:   log likelihood = -1340.5245  
Iteration 4:   log likelihood = -1340.5245  

Ordered probit regression                               Number of obs =  1,256
                                                        LR chi2(14)   = 235.49
                                                        Prob > chi2   = 0.0000
Log likelihood = -1340.5245                             Pseudo R2     = 0.0807

------------------------------------------------------------------------------
   us_depend | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     elec_tr |   .4389835   .1772739     2.48   0.013      .091533     .786434
       ldp_s |    .641482   .0575154    11.15   0.000      .528754    .7542101
  ldp_x_elec |  -.2164975   .0779101    -2.78   0.005    -.3691984   -.0637966
         age |   .0286963   .0213756     1.34   0.179     -.013199    .0705916
      female |  -.2650772   .0672691    -3.94   0.000    -.3969223   -.1332322
    collgrad |   .1543055   .0670651     2.30   0.021     .0228602    .2857507
         inc |   .0195058   .0108821     1.79   0.073    -.0018228    .0408344
     region2 |  -.1518676   .1967294    -0.77   0.440    -.5374501     .233715
     region3 |  -.2059993   .1672858    -1.23   0.218    -.5338734    .1218748
     region4 |  -.2733261   .1752234    -1.56   0.119    -.6167577    .0701055
     region5 |   -.181555   .1742449    -1.04   0.297    -.5230687    .1599588
     region6 |  -.3147069   .2023468    -1.56   0.120    -.7112993    .0818855
     region7 |  -.2457265   .2381037    -1.03   0.302    -.7124013    .2209483
     region8 |  -.3802778   .1837523    -2.07   0.038    -.7404256     -.02013
-------------+----------------------------------------------------------------
       /cut1 |  -1.139386   .2393016                     -1.608409   -.6703637
       /cut2 |  -.2912534   .2282081                      -.738533    .1560262
       /cut3 |   1.274269   .2289345                      .8255653    1.722972
       /cut4 |   2.906638   .2386693                      2.438855    3.374421
------------------------------------------------------------------------------
stata-replication/tables/main.tex
dir : seeout

Iteration 0:   log likelihood =  -1495.145  
Iteration 1:   log likelihood = -1494.8467  
Iteration 2:   log likelihood = -1494.8467  

Ordered probit regression                               Number of obs =  1,260
                                                        LR chi2(1)    =   0.60
                                                        Prob > chi2   = 0.4399
Log likelihood = -1494.8467                             Pseudo R2     = 0.0002

------------------------------------------------------------------------------
    us_trust | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     elec_tr |   .0469073    .060735     0.77   0.440    -.0721311    .1659458
-------------+----------------------------------------------------------------
       /cut1 |  -1.790255   .0731939                     -1.933712   -1.646797
       /cut2 |  -.8071105   .0501035                     -.9053117   -.7089094
       /cut3 |   .7058931   .0493891                      .6090923     .802694
       /cut4 |   1.879231   .0756668                      1.730927    2.027536
------------------------------------------------------------------------------
stata-replication/tables/main.tex
dir : seeout

Iteration 0:   log likelihood =  -1495.145  
Iteration 1:   log likelihood = -1430.9968  
Iteration 2:   log likelihood = -1430.8698  
Iteration 3:   log likelihood = -1430.8698  

Ordered probit regression                               Number of obs =  1,260
                                                        LR chi2(3)    = 128.55
                                                        Prob > chi2   = 0.0000
Log likelihood = -1430.8698                             Pseudo R2     = 0.0430

------------------------------------------------------------------------------
    us_trust | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     elec_tr |    .587909   .1747574     3.36   0.001     .2453907    .9304272
       ldp_s |    .548559   .0557176     9.85   0.000     .4393546    .6577634
  ldp_x_elec |  -.2428396   .0764016    -3.18   0.001     -.392584   -.0930951
-------------+----------------------------------------------------------------
       /cut1 |  -.7229169   .1341931                     -.9859305   -.4599033
       /cut2 |   .3348155   .1268899                      .0861158    .5835152
       /cut3 |   1.933475   .1342021                      1.670444    2.196507
       /cut4 |   3.176965   .1524786                      2.878112    3.475817
------------------------------------------------------------------------------
stata-replication/tables/main.tex
dir : seeout

Iteration 0:   log likelihood = -1489.4424  
Iteration 1:   log likelihood = -1419.2733  
Iteration 2:   log likelihood = -1419.1108  
Iteration 3:   log likelihood = -1419.1107  

Ordered probit regression                               Number of obs =  1,256
                                                        LR chi2(14)   = 140.66
                                                        Prob > chi2   = 0.0000
Log likelihood = -1419.1107                             Pseudo R2     = 0.0472

------------------------------------------------------------------------------
    us_trust | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     elec_tr |   .5726729   .1762845     3.25   0.001     .2271617    .9181841
       ldp_s |   .5408375   .0562824     9.61   0.000     .4305261     .651149
  ldp_x_elec |  -.2348174   .0770543    -3.05   0.002    -.3858409   -.0837938
         age |  -.0154502    .021137    -0.73   0.465     -.056878    .0259776
      female |  -.1667682   .0662859    -2.52   0.012    -.2966862   -.0368502
    collgrad |  -.0668028   .0662448    -1.01   0.313    -.1966403    .0630346
         inc |   .0151641   .0107615     1.41   0.159    -.0059281    .0362562
     region2 |  -.2571889   .1943769    -1.32   0.186    -.6381605    .1237828
     region3 |  -.2250049   .1651393    -1.36   0.173    -.5486719    .0986621
     region4 |  -.2060325    .172909    -1.19   0.233     -.544928     .132863
     region5 |   -.259679   .1719938    -1.51   0.131    -.5967807    .0774228
     region6 |  -.1780803   .2001316    -0.89   0.374    -.5703311    .2141705
     region7 |  -.2269754   .2342679    -0.97   0.333     -.686132    .2321811
     region8 |  -.2941209   .1812443    -1.62   0.105    -.6493533    .0611114
-------------+----------------------------------------------------------------
       /cut1 |  -1.080776   .2298792                     -1.531331   -.6302211
       /cut2 |  -.0260038   .2248329                     -.4666681    .4146606
       /cut3 |   1.587787   .2276203                      1.141659    2.033914
       /cut4 |   2.838451   .2381548                      2.371676    3.305225
------------------------------------------------------------------------------
stata-replication/tables/main.tex
dir : seeout

Iteration 0:   log likelihood = -1465.7267  
Iteration 1:   log likelihood = -1465.3571  
Iteration 2:   log likelihood = -1465.3571  

Ordered probit regression                               Number of obs =  1,260
                                                        LR chi2(1)    =   0.74
                                                        Prob > chi2   = 0.3899
Log likelihood = -1465.3571                             Pseudo R2     = 0.0003

------------------------------------------------------------------------------
     us_infl | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     elec_tr |   .0524914   .0610575     0.86   0.390     -.067179    .1721619
-------------+----------------------------------------------------------------
       /cut1 |  -1.692918   .0692737                     -1.828692   -1.557144
       /cut2 |  -.6559839   .0489107                      -.751847   -.5601207
       /cut3 |   .9354731   .0516336                       .834273    1.036673
       /cut4 |   1.979742   .0809723                      1.821039    2.138445
------------------------------------------------------------------------------
stata-replication/tables/main.tex
dir : seeout

Iteration 0:   log likelihood = -1465.7267  
Iteration 1:   log likelihood = -1457.3465  
Iteration 2:   log likelihood =  -1457.345  
Iteration 3:   log likelihood =  -1457.345  

Ordered probit regression                               Number of obs =  1,260
                                                        LR chi2(3)    =  16.76
                                                        Prob > chi2   = 0.0008
Log likelihood = -1457.345                              Pseudo R2     = 0.0057

------------------------------------------------------------------------------
     us_infl | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     elec_tr |   .3273468   .1741137     1.88   0.060    -.0139098    .6686033
       ldp_s |   .2027575   .0543199     3.73   0.000     .0962924    .3092225
  ldp_x_elec |  -.1254464   .0761203    -1.65   0.099    -.2746394    .0237467
-------------+----------------------------------------------------------------
       /cut1 |  -1.267797   .1335664                     -1.529583   -1.006012
       /cut2 |  -.2218761   .1261034                     -.4690342     .025282
       /cut3 |   1.380257   .1300456                      1.125372    1.635142
       /cut4 |    2.43308   .1459991                      2.146927    2.719233
------------------------------------------------------------------------------
stata-replication/tables/main.tex
dir : seeout

Iteration 0:   log likelihood = -1463.4779  
Iteration 1:   log likelihood = -1426.4406  
Iteration 2:   log likelihood = -1426.3959  
Iteration 3:   log likelihood = -1426.3959  

Ordered probit regression                               Number of obs =  1,256
                                                        LR chi2(14)   =  74.16
                                                        Prob > chi2   = 0.0000
Log likelihood = -1426.3959                             Pseudo R2     = 0.0253

------------------------------------------------------------------------------
     us_infl | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     elec_tr |   .3198757   .1761154     1.82   0.069     -.025304    .6650555
       ldp_s |   .1997263   .0550608     3.63   0.000     .0918091    .3076434
  ldp_x_elec |  -.1211276   .0769761    -1.57   0.116    -.2719981    .0297428
         age |  -.1378558   .0214593    -6.42   0.000    -.1799153   -.0957963
      female |   .1309472   .0661976     1.98   0.048     .0012023    .2606921
    collgrad |  -.0113873    .066364    -0.17   0.864    -.1414584    .1186838
         inc |   .0043509   .0107448     0.40   0.686    -.0167084    .0254103
     region2 |  -.4125415   .1948018    -2.12   0.034    -.7943461   -.0307369
     region3 |  -.2766121   .1654678    -1.67   0.095     -.600923    .0476987
     region4 |  -.2896288   .1732959    -1.67   0.095    -.6292825     .050025
     region5 |  -.3505636   .1723568    -2.03   0.042    -.6883768   -.0127504
     region6 |  -.4544808   .1999639    -2.27   0.023    -.8464029   -.0625587
     region7 |  -.2130062   .2361091    -0.90   0.367    -.6757716    .2497591
     region8 |  -.4189343   .1818607    -2.30   0.021    -.7753747   -.0624939
-------------+----------------------------------------------------------------
       /cut1 |  -2.034889    .232374                     -2.490334   -1.579445
       /cut2 |  -.9625375   .2267784                     -1.407015   -.5180601
       /cut3 |   .6826324   .2254666                      .2407259    1.124539
       /cut4 |   1.761726   .2341524                      1.302795    2.220656
------------------------------------------------------------------------------
stata-replication/tables/main.tex
dir : seeout

. *****************************************************************************
> **;
. *marginal effects - monte carlo simulation to calculate confidence intervals 
>   ;
. *****************************************************************************
> **;
.           foreach x in `dv' { ;
  2.         local b: variable label `x';
  3.         oprobit `x' elec_tr ldp_s ldp_x_elec age female collgrad inc regio
> n2 region3 region4 region5 region6 region7 region8;
  4.         preserve;
  5.         set seed 1768534  /*Musashi University zipcode*/;
  6.         drawnorm MG_b1-MG_b18, 
>             n(1000) means(e(b)) cov(e(V))clear;
  7.         summarize;
  8.         gen ldp =. ;
  9.         local i = 1 ;
 10.         while `i' <4 { ;
 11.             replace ldp = `i' if _n==`i';
 12.             local i = `i'+1 ;
 13.         } ;
 14.                  gen higher =. ;
 15.         gen mean =. ;
 16.         gen lower =. ;
 17.         local j =1 ;
 18.         while `j' <4 { ;
 19.             gen mef`j' = MG_b1 + (`j'*MG_b3);
 20.              centile mef`j', centile(2.5, 50, 97.5) ;
 21.             replace higher =`r(c_3)'  if _n==`j'  ;
 22.             replace mean =`r(c_2)'     if _n==`j' ;
 23.             replace lower =`r(c_1)'    if _n==`j';
 24.             local j = `j'+1 ;
 25.         } ;
 26.          twoway rcap higher lower ldp|| scatter mean ldp,
>             xlabel(1 "LDP-K Opposition" 2 "Nuetral" 3 "LDP-K Support" )
>             xsc(r(.5 3.5))
>             xtitle("")
>             ytitle("Marginal Effect")
>             legend(order(1 "95% confidence interval"))
>             title("`b'", width(100))
>             yline(0, lstyle(foreground));
 27.         graph export stata-replication/figures/mef_`x'.svg, replace;
 28.          *****************************************************************
> **************;
.         *predicted probabilities                                             
>           ;
.         *********************************************************************
> **********;
.          scalar h4 = 5;
 29.         scalar h7 = 3;
 30.         scalar h9 = 1;
 31.         local ldp = 1;
 32.         while `ldp' <4  {;
 33.             local trt = 0 ;
 34.             while `trt' <2 {;
 35.                 local e = 1 ;
 36.                 local t = 15 ;
 37.                 while `e' < 5 {;
 38.                     gen `x'_`ldp'_`trt'_eta`e' = MG_b`t'-(MG_b1*`trt'+MG_b
> 2*`ldp' + MG_b3*`trt'*`ldp' + MG_b4*h4 + MG_b5 + MG_b7*h7 + MG_b9);
 39.                     local e = `e'+1 ;
 40.                     local t = `t'+1 ;
 41.                 } ;
 42.                 local n = 1 ;
 43.                 while `n' < 5 {;
 44.                     gen `x'_`ldp'_`trt'_norm`n' = normal(`x'_`ldp'_`trt'_e
> ta`n');
 45.                     local n = `n'+1 ;
 46.                 } ;
 47.                 gen `x'_`ldp'_`trt'_p1 = `x'_`ldp'_`trt'_norm1;
 48.                 gen `x'_`ldp'_`trt'_p2 = `x'_`ldp'_`trt'_norm2-`x'_`ldp'_`
> trt'_norm1;
 49.                 gen `x'_`ldp'_`trt'_p3 = `x'_`ldp'_`trt'_norm3-`x'_`ldp'_`
> trt'_norm2;
 50.                 gen `x'_`ldp'_`trt'_p4 = `x'_`ldp'_`trt'_norm4-`x'_`ldp'_`
> trt'_norm3;
 51.                 gen `x'_`ldp'_`trt'_p5 = 1-`x'_`ldp'_`trt'_norm4;
 52.                 local trt = `trt'+1;
 53.             };
 54.             local d = 1 ;
 55.             while `d' < 6  {;
 56.                 gen `x'_`ldp'_diff`d' = `x'_`ldp'_1_p`d' - `x'_`ldp'_0_p`d
> ';
 57.             local d = `d'+1 ;
 58.             } ;
 59.             local ldp = `ldp'+1;
 60.         } ;
 61.         drop M* ;
 62.         sum *_p* ;
 63.         sum *diff* ;
 64.         centile *diff*, centile(2.5 97.5);
 65.         save stata-replication/data/sim_`x'.dta, replace ;
 66.         restore ;
 67.     };

Iteration 0:   log likelihood = -1458.2694  
Iteration 1:   log likelihood = -1341.1559  
Iteration 2:   log likelihood = -1340.5249  
Iteration 3:   log likelihood = -1340.5245  
Iteration 4:   log likelihood = -1340.5245  

Ordered probit regression                               Number of obs =  1,256
                                                        LR chi2(14)   = 235.49
                                                        Prob > chi2   = 0.0000
Log likelihood = -1340.5245                             Pseudo R2     = 0.0807

------------------------------------------------------------------------------
   us_depend | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     elec_tr |   .4389835   .1772739     2.48   0.013      .091533     .786434
       ldp_s |    .641482   .0575154    11.15   0.000      .528754    .7542101
  ldp_x_elec |  -.2164975   .0779101    -2.78   0.005    -.3691984   -.0637966
         age |   .0286963   .0213756     1.34   0.179     -.013199    .0705916
      female |  -.2650772   .0672691    -3.94   0.000    -.3969223   -.1332322
    collgrad |   .1543055   .0670651     2.30   0.021     .0228602    .2857507
         inc |   .0195058   .0108821     1.79   0.073    -.0018228    .0408344
     region2 |  -.1518676   .1967294    -0.77   0.440    -.5374501     .233715
     region3 |  -.2059993   .1672858    -1.23   0.218    -.5338734    .1218748
     region4 |  -.2733261   .1752234    -1.56   0.119    -.6167577    .0701055
     region5 |   -.181555   .1742449    -1.04   0.297    -.5230687    .1599588
     region6 |  -.3147069   .2023468    -1.56   0.120    -.7112993    .0818855
     region7 |  -.2457265   .2381037    -1.03   0.302    -.7124013    .2209483
     region8 |  -.3802778   .1837523    -2.07   0.038    -.7404256     -.02013
-------------+----------------------------------------------------------------
       /cut1 |  -1.139386   .2393016                     -1.608409   -.6703637
       /cut2 |  -.2912534   .2282081                      -.738533    .1560262
       /cut3 |   1.274269   .2289345                      .8255653    1.722972
       /cut4 |   2.906638   .2386693                      2.438855    3.374421
------------------------------------------------------------------------------
(obs 1,000)

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
       MG_b1 |      1,000    .4463707    .1765353  -.0958691   .9871959
       MG_b2 |      1,000    .6437421    .0588705    .451276   .8135263
       MG_b3 |      1,000   -.2203759    .0775376  -.4566961   .0105711
       MG_b4 |      1,000    .0280622    .0220069  -.0335596   .0954246
       MG_b5 |      1,000   -.2679477    .0648169   -.488896   -.091586
-------------+---------------------------------------------------------
       MG_b6 |      1,000    .1561761    .0677591  -.1275062   .3571192
       MG_b7 |      1,000    .0187147    .0110436  -.0180816   .0501889
       MG_b8 |      1,000   -.1480537    .1932697  -.7078918   .6244889
       MG_b9 |      1,000   -.2091817    .1639595  -.6896136   .4068126
      MG_b10 |      1,000   -.2730268    .1741714  -.8182403   .3182753
-------------+---------------------------------------------------------
      MG_b11 |      1,000   -.1865352    .1684491  -.6569893    .384228
      MG_b12 |      1,000   -.3126995    .2006893  -.8476273   .3603294
      MG_b13 |      1,000   -.2531996    .2347346  -.9562525   .4384953
      MG_b14 |      1,000   -.3852558    .1749471  -1.001796   .3637567
      MG_b15 |      1,000   -1.145648    .2396923  -1.896224  -.4495718
-------------+---------------------------------------------------------
      MG_b16 |      1,000   -.2961395     .230702  -1.102133   .4185111
      MG_b17 |      1,000    1.271411    .2302085   .5166703   1.985201
      MG_b18 |      1,000    2.902195    .2438515   2.049227   3.655646
(1,000 missing values generated)
(1 real change made)
(1 real change made)
(1 real change made)
(1,000 missing values generated)
(1,000 missing values generated)
(1,000 missing values generated)

                                                          Binom. interp.   
    Variable |       Obs  Percentile    Centile        [95% conf. interval]
-------------+-------------------------------------------------------------
        mef1 |     1,000        2.5    .0095796       -.0135185    .0212029
             |                   50      .22893         .222267    .2371596
             |                 97.5    .4251795        .4100708     .443258
(1 real change made)
(1 real change made)
(1 real change made)

                                                          Binom. interp.   
    Variable |       Obs  Percentile    Centile        [95% conf. interval]
-------------+-------------------------------------------------------------
        mef2 |     1,000        2.5   -.1208824       -.1282764   -.1138052
             |                   50    .0081811        .0036162    .0123527
             |                 97.5    .1264283        .1190643    .1333931
(1 real change made)
(1 real change made)
(1 real change made)

                                                          Binom. interp.   
    Variable |       Obs  Percentile    Centile        [95% conf. interval]
-------------+-------------------------------------------------------------
        mef3 |     1,000        2.5   -.3953451       -.4171329   -.3821259
             |                   50   -.2143279       -.2210141    -.208631
             |                 97.5   -.0409991       -.0539717   -.0284268
(1 real change made)
(1 real change made)
(1 real change made)
file stata-replication/figures/mef_us_depend.svg saved as SVG format

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
us_de~1_0_p1 |      1,000    .0673857    .0172572   .0305381   .1216295
us_de~1_0_p2 |      1,000    .1887309    .0247042   .1121683   .2623422
us_de~1_0_p3 |      1,000    .5606453    .0188372   .4874483   .6230282
us_de~1_0_p4 |      1,000    .1773648     .026759   .0993847   .2778496
us_de~1_0_p5 |      1,000    .0058733    .0020873   .0017141   .0138704
-------------+---------------------------------------------------------
us_de~1_1_p1 |      1,000    .0427834    .0121703   .0163324   .0883134
us_de~1_1_p2 |      1,000    .1466217    .0214312    .076291   .2110488
us_de~1_1_p3 |      1,000    .5619094    .0183905   .4991925    .628615
us_de~1_1_p4 |      1,000     .237866    .0303895   .1443471   .3286151
us_de~1_1_p5 |      1,000    .0108196     .003496   .0034996   .0262818
-------------+---------------------------------------------------------
us_de~2_0_p1 |      1,000    .0163579    .0051494   .0057446   .0386637
us_de~2_0_p2 |      1,000    .0809633    .0133726   .0422587   .1362622
us_de~2_0_p3 |      1,000    .5066197    .0233939   .4360461   .5947663
us_de~2_0_p4 |      1,000    .3663823    .0289477   .2640481   .4615135
us_de~2_0_p5 |      1,000    .0296768    .0069081   .0116869    .063099
-------------+---------------------------------------------------------
us_de~2_1_p1 |      1,000    .0161047    .0049478   .0060252   .0371543
us_de~2_1_p2 |      1,000    .0801864    .0128072   .0385155   .1233674
us_de~2_1_p3 |      1,000    .5055392     .022619   .4287238   .5899236
us_de~2_1_p4 |      1,000    .3681532    .0273377   .2741235   .4622466
us_de~2_1_p5 |      1,000    .0300165    .0068448   .0147532   .0704641
-------------+---------------------------------------------------------
us_de~3_0_p1 |      1,000    .0028282    .0013008   .0005749   .0113008
us_de~3_0_p2 |      1,000    .0237586    .0062784   .0081489   .0520759
us_de~3_0_p3 |      1,000    .3264683    .0329174   .2125269   .4547503
us_de~3_0_p4 |      1,000    .5402041    .0249699    .438509   .5998064
us_de~3_0_p5 |      1,000    .1067408    .0204194   .0473709     .21741
-------------+---------------------------------------------------------
us_de~3_1_p1 |      1,000    .0052649    .0020583   .0013045   .0150354
us_de~3_1_p2 |      1,000    .0372783     .008391   .0149114   .0695712
us_de~3_1_p3 |      1,000    .3924602    .0298199   .3001318   .4909895
us_de~3_1_p4 |      1,000    .4926022    .0270742   .3964877   .5684633
us_de~3_1_p5 |      1,000    .0723944    .0146862   .0360962   .1575224

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
us_d~1_diff1 |      1,000   -.0246024    .0127903  -.0633256   .0115877
us_d~1_diff2 |      1,000   -.0421092    .0204737   -.111762    .025383
us_d~1_diff3 |      1,000    .0012641    .0102146  -.0401044   .0368338
us_d~1_diff4 |      1,000    .0605012    .0290102  -.0371532    .149724
us_d~1_diff5 |      1,000    .0049463    .0028049  -.0031402   .0173348
-------------+---------------------------------------------------------
us_d~2_diff1 |      1,000   -.0002532    .0025576    -.00828   .0087272
us_d~2_diff2 |      1,000   -.0007769     .008246  -.0253218   .0307284
us_d~2_diff3 |      1,000   -.0010805    .0136164   -.049739    .059511
us_d~2_diff4 |      1,000    .0017709    .0199417  -.0722209   .0590107
us_d~2_diff5 |      1,000    .0003397    .0043181  -.0195725    .016735
-------------+---------------------------------------------------------
us_d~3_diff1 |      1,000    .0024367    .0013497  -.0003811   .0090171
us_d~3_diff2 |      1,000    .0135197    .0062139   -.001809   .0365627
us_d~3_diff3 |      1,000    .0659919     .028138  -.0058175   .1594663
us_d~3_diff4 |      1,000   -.0476019    .0210459  -.1228486     .00545
us_d~3_diff5 |      1,000   -.0343464    .0155908  -.0987024   .0028237

                                                          Binom. interp.   
    Variable |       Obs  Percentile    Centile        [95% conf. interval]
-------------+-------------------------------------------------------------
us_d~1_diff1 |     1,000        2.5   -.0517547       -.0541191   -.0501214
             |                 97.5   -.0009908       -.0022558    .0014671
us_d~1_diff2 |     1,000        2.5   -.0813721       -.0848029   -.0795372
             |                 97.5   -.0017635       -.0043758    .0026915
us_d~1_diff3 |     1,000        2.5    -.019642       -.0229406   -.0176272
             |                 97.5    .0222336        .0204759    .0265645
us_d~1_diff4 |     1,000        2.5    .0025725       -.0034577     .005871
             |                 97.5     .118573        .1129073    .1221311
us_d~1_diff5 |     1,000        2.5    .0002394       -.0002829    .0004566
             |                 97.5    .0115774        .0105535       .0121
us_d~2_diff1 |     1,000        2.5   -.0054962       -.0058149   -.0049725
             |                 97.5    .0047854        .0044391    .0056589
us_d~2_diff2 |     1,000        2.5   -.0174046       -.0184143   -.0158978
             |                 97.5    .0156667        .0145748    .0184867
us_d~2_diff3 |     1,000        2.5   -.0263637       -.0294449   -.0248317
             |                 97.5    .0257975        .0239258    .0294092
us_d~2_diff4 |     1,000        2.5   -.0382942       -.0407578   -.0348549
             |                 97.5    .0401254        .0379823    .0419421
us_d~2_diff5 |     1,000        2.5   -.0084236        -.008862    -.007777
             |                 97.5    .0083317        .0078019    .0089652
us_d~3_diff1 |     1,000        2.5    .0004305        .0002819    .0005003
             |                 97.5    .0056448        .0054216    .0061085
us_d~3_diff2 |     1,000        2.5    .0027004        .0018233    .0030674
             |                 97.5     .026471        .0254836    .0287722
us_d~3_diff3 |     1,000        2.5    .0129655        .0089068    .0165057
             |                 97.5    .1218998        .1187921    .1268283
us_d~3_diff4 |     1,000        2.5   -.0915916       -.0955818   -.0876752
             |                 97.5   -.0092275       -.0112886   -.0062552
us_d~3_diff5 |     1,000        2.5   -.0676678       -.0720279   -.0642364
             |                 97.5   -.0060986       -.0081396   -.0042331
file stata-replication/data/sim_us_depend.dta saved

Iteration 0:   log likelihood = -1489.4424  
Iteration 1:   log likelihood = -1419.2733  
Iteration 2:   log likelihood = -1419.1108  
Iteration 3:   log likelihood = -1419.1107  

Ordered probit regression                               Number of obs =  1,256
                                                        LR chi2(14)   = 140.66
                                                        Prob > chi2   = 0.0000
Log likelihood = -1419.1107                             Pseudo R2     = 0.0472

------------------------------------------------------------------------------
    us_trust | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     elec_tr |   .5726729   .1762845     3.25   0.001     .2271617    .9181841
       ldp_s |   .5408375   .0562824     9.61   0.000     .4305261     .651149
  ldp_x_elec |  -.2348174   .0770543    -3.05   0.002    -.3858409   -.0837938
         age |  -.0154502    .021137    -0.73   0.465     -.056878    .0259776
      female |  -.1667682   .0662859    -2.52   0.012    -.2966862   -.0368502
    collgrad |  -.0668028   .0662448    -1.01   0.313    -.1966403    .0630346
         inc |   .0151641   .0107615     1.41   0.159    -.0059281    .0362562
     region2 |  -.2571889   .1943769    -1.32   0.186    -.6381605    .1237828
     region3 |  -.2250049   .1651393    -1.36   0.173    -.5486719    .0986621
     region4 |  -.2060325    .172909    -1.19   0.233     -.544928     .132863
     region5 |   -.259679   .1719938    -1.51   0.131    -.5967807    .0774228
     region6 |  -.1780803   .2001316    -0.89   0.374    -.5703311    .2141705
     region7 |  -.2269754   .2342679    -0.97   0.333     -.686132    .2321811
     region8 |  -.2941209   .1812443    -1.62   0.105    -.6493533    .0611114
-------------+----------------------------------------------------------------
       /cut1 |  -1.080776   .2298792                     -1.531331   -.6302211
       /cut2 |  -.0260038   .2248329                     -.4666681    .4146606
       /cut3 |   1.587787   .2276203                      1.141659    2.033914
       /cut4 |   2.838451   .2381548                      2.371676    3.305225
------------------------------------------------------------------------------
(obs 1,000)

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
       MG_b1 |      1,000    .5800189      .17555   .0408056   1.117825
       MG_b2 |      1,000    .5430611    .0575945   .3546343   .7090598
       MG_b3 |      1,000   -.2386499    .0766807    -.47235  -.0101344
       MG_b4 |      1,000   -.0160829    .0217511  -.0770122    .050726
       MG_b5 |      1,000   -.1695914    .0638956  -.3889875   .0014981
-------------+---------------------------------------------------------
       MG_b6 |      1,000    -.065011    .0669493  -.3461398   .1355088
       MG_b7 |      1,000    .0143781    .0109197  -.0220795   .0454377
       MG_b8 |      1,000    -.253416    .1909575  -.8063024    .509885
       MG_b9 |      1,000   -.2281558    .1618445  -.7017226   .3787428
      MG_b10 |      1,000   -.2057187    .1718839  -.7460074    .374677
-------------+---------------------------------------------------------
      MG_b11 |      1,000   -.2646175    .1662429  -.7289825   .2980659
      MG_b12 |      1,000   -.1760363    .1985948  -.7061968   .4875266
      MG_b13 |      1,000   -.2343456    .2309734   -.927218   .4462425
      MG_b14 |      1,000   -.2990422     .172562  -.9066926   .4403141
      MG_b15 |      1,000    -1.08664      .23055  -1.800345  -.4125206
-------------+---------------------------------------------------------
      MG_b16 |      1,000    -.030657    .2272836  -.8162034   .6602487
      MG_b17 |      1,000    1.585143    .2290123   .8390801   2.297501
      MG_b18 |      1,000    2.834001    .2437641   1.970479    3.57562
(1,000 missing values generated)
(1 real change made)
(1 real change made)
(1 real change made)
(1,000 missing values generated)
(1,000 missing values generated)
(1,000 missing values generated)

                                                          Binom. interp.   
    Variable |       Obs  Percentile    Centile        [95% conf. interval]
-------------+-------------------------------------------------------------
        mef1 |     1,000        2.5    .1248283        .1027246    .1374135
             |                   50    .3443451        .3374855    .3526587
             |                 97.5    .5399728        .5248403     .557969
(1 real change made)
(1 real change made)
(1 real change made)

                                                          Binom. interp.   
    Variable |       Obs  Percentile    Centile        [95% conf. interval]
-------------+-------------------------------------------------------------
        mef2 |     1,000        2.5   -.0224378       -.0305583   -.0147555
             |                   50    .1055025        .1007053    .1100077
             |                 97.5     .222222        .2138631    .2293665
(1 real change made)
(1 real change made)
(1 real change made)

                                                          Binom. interp.   
    Variable |       Obs  Percentile    Centile        [95% conf. interval]
-------------+-------------------------------------------------------------
        mef3 |     1,000        2.5   -.3129378       -.3337984   -.2997245
             |                   50   -.1357821       -.1424014   -.1297257
             |                 97.5    .0342919        .0218953    .0474596
(1 real change made)
(1 real change made)
(1 real change made)
file stata-replication/figures/mef_us_trust.svg saved as SVG format

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
us_tr~1_0_p1 |      1,000    .1176751     .022822   .0626308   .1894204
us_tr~1_0_p2 |      1,000    .3274713    .0262214   .2386277   .3957533
us_tr~1_0_p3 |      1,000    .4838171    .0289058   .3969068   .5685668
us_tr~1_0_p4 |      1,000    .0676016    .0139423   .0309793   .1248058
us_tr~1_0_p5 |      1,000    .0034349    .0013627   .0008258   .0091884
-------------+---------------------------------------------------------
us_tr~1_1_p1 |      1,000    .0635558    .0145193   .0299645    .114964
us_tr~1_1_p2 |      1,000    .2529477    .0260955   .1637546   .3257375
us_tr~1_1_p3 |      1,000    .5541269    .0201158   .4817803   .6123377
us_tr~1_1_p4 |      1,000    .1203846    .0201042   .0628914   .1848777
us_tr~1_1_p5 |      1,000     .008985    .0031051   .0027353   .0235134
-------------+---------------------------------------------------------
us_tr~2_0_p1 |      1,000    .0419918    .0094967   .0212873   .0778395
us_tr~2_0_p2 |      1,000    .2065597    .0217155   .1355897   .2818615
us_tr~2_0_p3 |      1,000    .5753249    .0156906   .5158603   .6302564
us_tr~2_0_p4 |      1,000     .161107    .0204007   .0974206    .236338
us_tr~2_0_p5 |      1,000    .0150165    .0042306   .0048143   .0364261
-------------+---------------------------------------------------------
us_tr~2_1_p1 |      1,000    .0335806    .0077085   .0166669   .0624783
us_tr~2_1_p2 |      1,000    .1836459    .0198487   .1132098   .2469978
us_tr~2_1_p3 |      1,000     .579036    .0150955   .5228968   .6368597
us_tr~2_1_p4 |      1,000    .1844366    .0206808    .118937   .2641706
us_tr~2_1_p5 |      1,000    .0193009     .005113   .0081547   .0506167
-------------+---------------------------------------------------------
us_tr~3_0_p1 |      1,000    .0118162    .0039231   .0033893   .0328085
us_tr~3_0_p2 |      1,000    .0998339    .0172737   .0478647   .1681283
us_tr~3_0_p3 |      1,000    .5396721    .0225216   .4549146   .6122654
us_tr~3_0_p4 |      1,000    .2969592    .0292324   .1957172   .3976978
us_tr~3_0_p5 |      1,000    .0517186    .0126766   .0184991   .1253664
-------------+---------------------------------------------------------
us_tr~3_1_p1 |      1,000    .0165719    .0048059   .0061625   .0359101
us_tr~3_1_p2 |      1,000    .1227144    .0183371   .0671623   .1855742
us_tr~3_1_p3 |      1,000    .5607664    .0181272   .4977418   .6212353
us_tr~3_1_p4 |      1,000    .2611041    .0262252    .180321    .348277
us_tr~3_1_p5 |      1,000    .0388432      .00968   .0161257   .0982224

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
us_t~1_diff1 |      1,000   -.0541193    .0187006  -.1082872   .0015577
us_t~1_diff2 |      1,000   -.0745236     .023784  -.1527779    .002649
us_t~1_diff3 |      1,000    .0703098    .0244174  -.0020043   .1494001
us_t~1_diff4 |      1,000     .052783     .017628  -.0020025   .1089302
us_t~1_diff5 |      1,000    .0055501    .0024798  -.0001999   .0175765
-------------+---------------------------------------------------------
us_t~2_diff1 |      1,000   -.0084112    .0053862  -.0252228   .0093172
us_t~2_diff2 |      1,000   -.0229138    .0140215  -.0638072   .0293031
us_t~2_diff3 |      1,000    .0037111    .0050127  -.0152803   .0278932
us_t~2_diff4 |      1,000    .0233296    .0142559  -.0313771   .0697148
us_t~2_diff5 |      1,000    .0042843    .0028195   -.007131   .0174376
-------------+---------------------------------------------------------
us_t~3_diff1 |      1,000    .0047557    .0034207  -.0051761   .0203224
us_t~3_diff2 |      1,000    .0228806    .0152417  -.0191898   .0737431
us_t~3_diff3 |      1,000    .0210943    .0151222   -.014891   .0820145
us_t~3_diff4 |      1,000   -.0358551    .0237826  -.1118626   .0268112
us_t~3_diff5 |      1,000   -.0128754      .00898  -.0534661   .0077096

                                                          Binom. interp.   
    Variable |       Obs  Percentile    Centile        [95% conf. interval]
-------------+-------------------------------------------------------------
us_t~1_diff1 |     1,000        2.5   -.0923972       -.0948719   -.0900182
             |                 97.5   -.0192606       -.0211481   -.0157664
us_t~1_diff2 |     1,000        2.5   -.1189377       -.1256593   -.1175232
             |                 97.5   -.0271184        -.030086   -.0216789
us_t~1_diff3 |     1,000        2.5     .024977        .0217901    .0277263
             |                 97.5    .1202518        .1178615    .1233465
us_t~1_diff4 |     1,000        2.5     .018302        .0157006    .0215891
             |                 97.5    .0885119        .0862849     .094202
us_t~1_diff5 |     1,000        2.5    .0016571        .0013328    .0019464
             |                 97.5    .0112449        .0107407    .0121704
us_t~2_diff1 |     1,000        2.5   -.0195543       -.0203831   -.0187917
             |                 97.5    .0020036        .0011422    .0026693
us_t~2_diff2 |     1,000        2.5   -.0504962       -.0522359   -.0485246
             |                 97.5     .004818        .0032646    .0070146
us_t~2_diff3 |     1,000        2.5   -.0046144       -.0051169   -.0033884
             |                 97.5    .0155068        .0140729    .0170609
us_t~2_diff4 |     1,000        2.5   -.0052898        -.007219   -.0032408
             |                 97.5    .0500667        .0493631    .0520048
us_t~2_diff5 |     1,000        2.5   -.0009317       -.0013119   -.0005723
             |                 97.5    .0099921        .0096789    .0106664
us_t~3_diff1 |     1,000        2.5   -.0012754       -.0015923   -.0007172
             |                 97.5     .012403         .011892    .0130115
us_t~3_diff2 |     1,000        2.5   -.0057574       -.0081577   -.0037205
             |                 97.5    .0535029        .0513711    .0568822
us_t~3_diff3 |     1,000        2.5    -.004485       -.0065276   -.0032576
             |                 97.5    .0554479        .0506391    .0581793
us_t~3_diff4 |     1,000        2.5   -.0821063       -.0871281   -.0782774
             |                 97.5    .0088496        .0059394    .0125149
us_t~3_diff5 |     1,000        2.5   -.0323949       -.0348066   -.0302676
             |                 97.5    .0032352        .0020531    .0040639
file stata-replication/data/sim_us_trust.dta saved

Iteration 0:   log likelihood = -1463.4779  
Iteration 1:   log likelihood = -1426.4406  
Iteration 2:   log likelihood = -1426.3959  
Iteration 3:   log likelihood = -1426.3959  

Ordered probit regression                               Number of obs =  1,256
                                                        LR chi2(14)   =  74.16
                                                        Prob > chi2   = 0.0000
Log likelihood = -1426.3959                             Pseudo R2     = 0.0253

------------------------------------------------------------------------------
     us_infl | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     elec_tr |   .3198757   .1761154     1.82   0.069     -.025304    .6650555
       ldp_s |   .1997263   .0550608     3.63   0.000     .0918091    .3076434
  ldp_x_elec |  -.1211276   .0769761    -1.57   0.116    -.2719981    .0297428
         age |  -.1378558   .0214593    -6.42   0.000    -.1799153   -.0957963
      female |   .1309472   .0661976     1.98   0.048     .0012023    .2606921
    collgrad |  -.0113873    .066364    -0.17   0.864    -.1414584    .1186838
         inc |   .0043509   .0107448     0.40   0.686    -.0167084    .0254103
     region2 |  -.4125415   .1948018    -2.12   0.034    -.7943461   -.0307369
     region3 |  -.2766121   .1654678    -1.67   0.095     -.600923    .0476987
     region4 |  -.2896288   .1732959    -1.67   0.095    -.6292825     .050025
     region5 |  -.3505636   .1723568    -2.03   0.042    -.6883768   -.0127504
     region6 |  -.4544808   .1999639    -2.27   0.023    -.8464029   -.0625587
     region7 |  -.2130062   .2361091    -0.90   0.367    -.6757716    .2497591
     region8 |  -.4189343   .1818607    -2.30   0.021    -.7753747   -.0624939
-------------+----------------------------------------------------------------
       /cut1 |  -2.034889    .232374                     -2.490334   -1.579445
       /cut2 |  -.9625375   .2267784                     -1.407015   -.5180601
       /cut3 |   .6826324   .2254666                      .2407259    1.124539
       /cut4 |   1.761726   .2341524                      1.302795    2.220656
------------------------------------------------------------------------------
(obs 1,000)

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
       MG_b1 |      1,000    .3272146    .1753816  -.2114813   .8645053
       MG_b2 |      1,000    .2019057    .0563394   .0175427   .3642456
       MG_b3 |      1,000   -.1249582    .0766093  -.3584268   .1033087
       MG_b4 |      1,000   -.1385022    .0220796   -.200342  -.0705907
       MG_b5 |      1,000    .1281824    .0637961  -.0945997   .3004681
-------------+---------------------------------------------------------
       MG_b6 |      1,000    -.009582     .067065  -.2911861    .191193
       MG_b7 |      1,000    .0035632    .0109023  -.0328845   .0344985
       MG_b8 |      1,000   -.4087931    .1913149  -.9638907   .3561266
       MG_b9 |      1,000   -.2797663    .1621152  -.7548844   .3239735
      MG_b10 |      1,000    -.289306    .1722446  -.8340537   .2889324
-------------+---------------------------------------------------------
      MG_b11 |      1,000   -.3555521    .1664943  -.8186869   .2028153
      MG_b12 |      1,000   -.4525276    .1983454  -.9889138   .2121692
      MG_b13 |      1,000   -.2204869    .2329038  -.9149448   .4679302
      MG_b14 |      1,000   -.4238845    .1731143  -1.026812   .3155809
      MG_b15 |      1,000   -2.040572    .2335649  -2.762783  -1.351967
-------------+---------------------------------------------------------
      MG_b16 |      1,000   -.9672543    .2293512  -1.747815  -.2776249
      MG_b17 |      1,000    .6799508    .2264901  -.0608243   1.386465
      MG_b18 |      1,000    1.757046    .2392137   .9076683    2.47786
(1,000 missing values generated)
(1 real change made)
(1 real change made)
(1 real change made)
(1,000 missing values generated)
(1,000 missing values generated)
(1,000 missing values generated)

                                                          Binom. interp.   
    Variable |       Obs  Percentile    Centile        [95% conf. interval]
-------------+-------------------------------------------------------------
        mef1 |     1,000        2.5   -.0137257       -.0363012   -.0014014
             |                   50    .2051157        .1983829    .2137551
             |                 97.5    .4007566        .3854375     .418614
(1 real change made)
(1 real change made)
(1 real change made)

                                                          Binom. interp.   
    Variable |       Obs  Percentile    Centile        [95% conf. interval]
-------------+-------------------------------------------------------------
        mef2 |     1,000        2.5   -.0480963       -.0562435    -.040694
             |                   50    .0802565        .0755999    .0848829
             |                 97.5    .1967349        .1889911    .2038946
(1 real change made)
(1 real change made)
(1 real change made)

                                                          Binom. interp.   
    Variable |       Obs  Percentile    Centile        [95% conf. interval]
-------------+-------------------------------------------------------------
        mef3 |     1,000        2.5   -.2251316       -.2460106   -.2111985
             |                   50   -.0471728       -.0538432   -.0416729
             |                 97.5    .1225258        .1099634    .1352041
(1 real change made)
(1 real change made)
(1 real change made)
file stata-replication/figures/mef_us_infl.svg saved as SVG format

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
us_in~1_0_p1 |      1,000    .0807736    .0171373   .0407394   .1336108
us_in~1_0_p2 |      1,000    .2884415    .0264068   .1973036   .3590454
us_in~1_0_p3 |      1,000    .5346083     .024579   .4605668   .6065038
us_in~1_0_p4 |      1,000    .0872603     .016248   .0438409   .1523091
us_in~1_0_p5 |      1,000    .0089164    .0031274   .0024272   .0222445
-------------+---------------------------------------------------------
us_in~1_1_p1 |      1,000    .0547173    .0126971   .0250004   .1020136
us_in~1_1_p2 |      1,000    .2415565    .0256334   .1570815   .3139942
us_in~1_1_p3 |      1,000    .5687037    .0188687   .5014175   .6255988
us_in~1_1_p4 |      1,000    .1199918    .0195784   .0651559   .1832019
us_in~1_1_p5 |      1,000    .0150306    .0048685   .0050009   .0382599
-------------+---------------------------------------------------------
us_in~2_0_p1 |      1,000    .0544973    .0112039   .0296303   .0951574
us_in~2_0_p2 |      1,000    .2416245    .0224118   .1661757   .3163914
us_in~2_0_p3 |      1,000    .5692747    .0176247   .5039954    .629078
us_in~2_0_p4 |      1,000    .1197044    .0169041   .0683936   .1832772
us_in~2_0_p5 |      1,000    .0148992    .0043102   .0045289   .0370133
-------------+---------------------------------------------------------
us_in~2_1_p1 |      1,000    .0464733    .0095756   .0242972   .0836429
us_in~2_1_p2 |      1,000    .2235447    .0211228   .1467403   .2890434
us_in~2_1_p3 |      1,000    .5780963    .0162139   .5158852   .6323599
us_in~2_1_p4 |      1,000    .1338772    .0172085   .0806572    .201212
us_in~2_1_p5 |      1,000    .0180084    .0049609   .0073795   .0486785
-------------+---------------------------------------------------------
us_in~3_0_p1 |      1,000    .0358948    .0093577   .0134882   .0803584
us_in~3_0_p2 |      1,000    .1951016    .0242283   .1149292   .2805429
us_in~3_0_p3 |      1,000    .5856308    .0153369   .5226194   .6412773
us_in~3_0_p4 |      1,000    .1589295    .0226724   .0866882    .249392
us_in~3_0_p5 |      1,000    .0244434    .0072316   .0071033   .0688108
-------------+---------------------------------------------------------
us_in~3_1_p1 |      1,000    .0396597    .0093653   .0181128   .0740668
us_in~3_1_p2 |      1,000    .2058559    .0232512   .1293924   .2823664
us_in~3_1_p3 |      1,000    .5836297    .0158521   .5256937   .6383283
us_in~3_1_p4 |      1,000    .1490712    .0202616   .0909668   .2198161
us_in~3_1_p5 |      1,000    .0217835    .0062305   .0079893   .0616935

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
us_infl_1~f1 |      1,000   -.0260563    .0144556  -.0699192   .0167542
us_infl_1~f2 |      1,000    -.046885    .0249144  -.1262785   .0365452
us_infl_1~f3 |      1,000    .0340954    .0196298  -.0212715   .1007732
us_infl_1~f4 |      1,000    .0327316    .0177529   -.027831   .0882958
us_infl_1~f5 |      1,000    .0061143     .003763   -.005022   .0239156
-------------+---------------------------------------------------------
us_infl_2~f1 |      1,000   -.0080239    .0066279  -.0291783   .0142842
us_infl_2~f2 |      1,000   -.0180798    .0146523  -.0614225   .0369846
us_infl_2~f3 |      1,000    .0088216    .0078936  -.0138038   .0405207
us_infl_2~f4 |      1,000    .0141728    .0115756  -.0309914   .0527413
us_infl_2~f5 |      1,000    .0031093    .0026733  -.0083723   .0157362
-------------+---------------------------------------------------------
us_infl_3~f1 |      1,000    .0037649    .0075003   -.020917   .0338088
us_infl_3~f2 |      1,000    .0107543     .020315  -.0437286   .0789056
us_infl_3~f3 |      1,000   -.0020011     .005998  -.0275443    .030188
us_infl_3~f4 |      1,000   -.0098583    .0184053  -.0675986   .0413613
us_infl_3~f5 |      1,000   -.0026599    .0050202  -.0259728    .011586

                                                          Binom. interp.   
    Variable |       Obs  Percentile    Centile        [95% conf. interval]
-------------+-------------------------------------------------------------
us_infl_1~f1 |     1,000        2.5   -.0551939       -.0571398   -.0533509
             |                 97.5    .0016436        .0001701    .0048234
us_infl_1~f2 |     1,000        2.5   -.0953046       -.0992686    -.089931
             |                 97.5    .0032286        .0003266    .0086575
us_infl_1~f3 |     1,000        2.5   -.0022324       -.0058047   -.0002201
             |                 97.5     .075187        .0732242    .0778472
us_infl_1~f4 |     1,000        2.5   -.0022124        -.005565   -.0002371
             |                 97.5    .0698907        .0651941    .0715745
us_infl_1~f5 |     1,000        2.5   -.0004316       -.0010753   -.0000419
             |                 97.5    .0144294        .0136304    .0156117
us_infl_2~f1 |     1,000        2.5    -.021167       -.0225165     -.02061
             |                 97.5     .005206        .0040015    .0061157
us_infl_2~f2 |     1,000        2.5   -.0468597       -.0485238   -.0449692
             |                 97.5    .0111245        .0094555    .0134177
us_infl_2~f3 |     1,000        2.5   -.0052039       -.0062814   -.0042806
             |                 97.5    .0258014        .0241161    .0279343
us_infl_2~f4 |     1,000        2.5    -.009105       -.0108257    -.007005
             |                 97.5    .0357789        .0352093    .0373469
us_infl_2~f5 |     1,000        2.5   -.0019939       -.0023458   -.0015981
             |                 97.5    .0084207        .0080039    .0090017
us_infl_3~f1 |     1,000        2.5   -.0106246       -.0117407    -.009537
             |                 97.5    .0187527        .0178383    .0199494
us_infl_3~f2 |     1,000        2.5   -.0274443       -.0302976   -.0249694
             |                 97.5    .0514279        .0485462    .0559506
us_infl_3~f3 |     1,000        2.5   -.0164046       -.0177422   -.0148733
             |                 97.5    .0094957        .0083398    .0109968
us_infl_3~f4 |     1,000        2.5   -.0465426       -.0507134   -.0430406
             |                 97.5    .0245936        .0226461      .02724
us_infl_3~f5 |     1,000        2.5   -.0135424       -.0151619   -.0123135
             |                 97.5    .0066433        .0061005    .0071182
file stata-replication/data/sim_us_infl.dta saved

.          *********************************;
. *descriptive stats               ;
. *********************************;
.     outreg2 using stata-replication/tables/decrip.tex, 
>         replace 
>         sum(log) 
>         wide;

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
         age |      1,260    3.501587    1.481417          1          5
      region |      1,260    4.228571    1.836911          1          8
      female |      1,260    .5198413    .4998045          0          1
        educ |      1,259    6.622716    2.809504          1         11
    collgrad |      1,259     .482923    .4999069          0          1
-------------+---------------------------------------------------------
         inc |      1,257    4.198091     3.02006          1         10
       ldp_s |      1,260    2.139683    .8018128          1          3
     elec_tr |      1,260    .5015873     .500196          0          1
  ldp_x_elec |      1,260    1.062698    1.203664          0          3
   us_depend |      1,260    3.463492    .7847436          1          5
-------------+---------------------------------------------------------
    us_trust |      1,260     3.04127    .8059814          1          5
     us_infl |      1,260    2.916667     .792263          1          5
       index |      1,260    7.421429    1.842319          1         13
     region1 |      1,260    .0396825    .1952898          0          1
     region2 |      1,260    .0698413    .2549805          0          1
-------------+---------------------------------------------------------
     region3 |      1,260    .3420635    .4745891          0          1
     region4 |      1,260     .168254    .3742402          0          1
     region5 |      1,260    .1801587    .3844722          0          1
     region6 |      1,260    .0603175    .2381686          0          1
     region7 |      1,260    .0301587    .1710918          0          1
-------------+---------------------------------------------------------
     region8 |      1,260    .1095238    .3124193          0          1

Following variable is string, not included:  
startdate  enddate  
stata-replication/tables/decrip.tex
dir : seeout

. ***************************;
. *balance check             ;
. ***************************;
.     probit elec_tr  ldp_s age  female collgrad inc region2 region3 region4 re
> gion5 region6 region7 region8 ;

Iteration 0:   log likelihood = -870.58649  
Iteration 1:   log likelihood = -868.79481  
Iteration 2:   log likelihood =  -868.7948  

Probit regression                                       Number of obs =  1,256
                                                        LR chi2(12)   =   3.58
                                                        Prob > chi2   = 0.9898
Log likelihood = -868.7948                              Pseudo R2     = 0.0021

------------------------------------------------------------------------------
     elec_tr | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
       ldp_s |  -.0388511   .0444033    -0.87   0.382      -.12588    .0481778
         age |  -.0072094   .0243687    -0.30   0.767    -.0549712    .0405523
      female |  -.0258943   .0762243    -0.34   0.734    -.1752912    .1235026
    collgrad |  -.0139687   .0764568    -0.18   0.855    -.1638212    .1358838
         inc |  -.0188228   .0123916    -1.52   0.129    -.0431098    .0054643
     region2 |   .0020089   .2230372     0.01   0.993     -.435136    .4391538
     region3 |   .0350743   .1891672     0.19   0.853    -.3356866    .4058351
     region4 |    .026086   .1982594     0.13   0.895    -.3624952    .4146673
     region5 |   .0303768   .1970713     0.15   0.877    -.3558758    .4166293
     region6 |   .0299279   .2295749     0.13   0.896    -.4200305    .4798864
     region7 |   .0036589   .2700217     0.01   0.989    -.5255739    .5328916
     region8 |   .0224033     .20783     0.11   0.914    -.3849359    .4297426
       _cons |   .1853181   .2349809     0.79   0.430     -.275236    .6458723
------------------------------------------------------------------------------

.     outreg2 using stata-replication/tables/balance, 
>         tex replace 
>         ctitle(Model 1) 
>         title(Randomization-Balance Check);
stata-replication/tables/balance.tex
dir : seeout

. ************************;
. *    index              ;
. ************************;
.     reg index elec_tr;

      Source |       SS           df       MS      Number of obs   =     1,260
-------------+----------------------------------   F(1, 1258)      =      0.15
       Model |   .50858692         1   .50858692   Prob > F        =    0.6988
    Residual |  4272.71284     1,258   3.3964331   R-squared       =    0.0001
-------------+----------------------------------   Adj R-squared   =   -0.0007
       Total |  4273.22143     1,259  3.39413934   Root MSE        =    1.8429

------------------------------------------------------------------------------
       index | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     elec_tr |   .0401818   .1038385     0.39   0.699    -.1635339    .2438975
       _cons |   7.401274   .0735414   100.64   0.000     7.256997    7.545551
------------------------------------------------------------------------------

.     outreg2 using stata-replication/tables/index, 
>         tex replace 
>         ctitle(Model 1, Basic) 
>         title(Index);
stata-replication/tables/index.tex
dir : seeout

.     reg index elec_tr ldp_s ldp_x_elec;

      Source |       SS           df       MS      Number of obs   =     1,260
-------------+----------------------------------   F(3, 1256)      =     55.63
       Model |  501.200819         3   167.06694   Prob > F        =    0.0000
    Residual |  3772.02061     1,256  3.00320112   R-squared       =    0.1173
-------------+----------------------------------   Adj R-squared   =    0.1152
       Total |  4273.22143     1,259  3.39413934   Root MSE        =     1.733

------------------------------------------------------------------------------
       index | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     elec_tr |   .9307644   .2785162     3.34   0.001     .3843561    1.477173
       ldp_s |    .964176   .0867837    11.11   0.000      .793919    1.134433
  ldp_x_elec |  -.4011646   .1218791    -3.29   0.001    -.6402737   -.1620555
       _cons |   5.317855   .1998692    26.61   0.000     4.925741     5.70997
------------------------------------------------------------------------------

.     outreg2 using stata-replication/tables/index, 
>         tex append 
>         ctitle(Model 2, Partisan);
stata-replication/tables/index.tex
dir : seeout

.     reg index elec_tr ldp_s ldp_x_elec age female educ inc region2 region3 re
> gion4 region5 region6 region7 region8 ;

      Source |       SS           df       MS      Number of obs   =     1,256
-------------+----------------------------------   F(14, 1241)     =     13.49
       Model |  563.498668        14  40.2499048   Prob > F        =    0.0000
    Residual |  3703.01009     1,241   2.9838921   R-squared       =    0.1321
-------------+----------------------------------   Adj R-squared   =    0.1223
       Total |  4266.50876     1,255  3.39960857   Root MSE        =    1.7274

------------------------------------------------------------------------------
       index | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     elec_tr |   .9093492   .2798722     3.25   0.001     .3602743    1.458424
       ldp_s |   .9456819   .0873996    10.82   0.000     .7742145    1.117149
  ldp_x_elec |  -.3893574   .1224606    -3.18   0.002    -.6296101   -.1491047
         age |  -.0875779   .0335593    -2.61   0.009    -.1534171   -.0217387
      female |  -.1821473   .1037806    -1.76   0.079     -.385752    .0214575
        educ |  -.0058845   .0184655    -0.32   0.750    -.0421115    .0303426
         inc |    .029631   .0171001     1.73   0.083    -.0039173    .0631792
     region2 |  -.5646929   .3072933    -1.84   0.066    -1.167565    .0381788
     region3 |  -.4744134   .2605516    -1.82   0.069    -.9855837    .0367568
     region4 |  -.5307318   .2732178    -1.94   0.052    -1.066752    .0052881
     region5 |   -.546307   .2715899    -2.01   0.044    -1.079133   -.0134809
     region6 |  -.6467264   .3158818    -2.05   0.041    -1.266448    -.027005
     region7 |  -.4568735   .3727561    -1.23   0.221    -1.188175    .2744284
     region8 |  -.7545669   .2865358    -2.63   0.009    -1.316715   -.1924187
       _cons |   6.195753   .3671799    16.87   0.000     5.475391    6.916115
------------------------------------------------------------------------------

.     outreg2 using stata-replication/tables/index, 
>         tex append 
>         ctitle(Model 3, Controls);
stata-replication/tables/index.tex
dir : seeout

. log close Hearn_2023;
      name:  Hearn_2023
       log:  elec-log.log
  log type:  text
 closed on:  30 Mar 2023, 18:21:12
-------------------------------------------------------------------------------
